3.1.48 \(\int \frac {x (a+b \log (c x^n))}{(d+e x)^3} \, dx\) [48]

Optimal. Leaf size=62 \[ -\frac {b n}{2 e^2 (d+e x)}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d (d+e x)^2}-\frac {b n \log (d+e x)}{2 d e^2} \]

[Out]

-1/2*b*n/e^2/(e*x+d)+1/2*x^2*(a+b*ln(c*x^n))/d/(e*x+d)^2-1/2*b*n*ln(e*x+d)/d/e^2

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2373, 45} \begin {gather*} \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d (d+e x)^2}-\frac {b n}{2 e^2 (d+e x)}-\frac {b n \log (d+e x)}{2 d e^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(a + b*Log[c*x^n]))/(d + e*x)^3,x]

[Out]

-1/2*(b*n)/(e^2*(d + e*x)) + (x^2*(a + b*Log[c*x^n]))/(2*d*(d + e*x)^2) - (b*n*Log[d + e*x])/(2*d*e^2)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2373

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp
[(f*x)^(m + 1)*(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])/(d*f*(m + 1))), x] - Dist[b*(n/(d*(m + 1))), Int[(f*x)^
m*(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && EqQ[m + r*(q + 1) + 1, 0] && NeQ[
m, -1]

Rubi steps

\begin {align*} \int \frac {x \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^3} \, dx &=\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d (d+e x)^2}-\frac {(b n) \int \frac {x}{(d+e x)^2} \, dx}{2 d}\\ &=\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d (d+e x)^2}-\frac {(b n) \int \left (-\frac {d}{e (d+e x)^2}+\frac {1}{e (d+e x)}\right ) \, dx}{2 d}\\ &=-\frac {b n}{2 e^2 (d+e x)}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{2 d (d+e x)^2}-\frac {b n \log (d+e x)}{2 d e^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 75, normalized size = 1.21 \begin {gather*} \frac {b n \log (x)-\frac {b d n (d+e x)+a d (d+2 e x)+b d (d+2 e x) \log \left (c x^n\right )+b n (d+e x)^2 \log (d+e x)}{(d+e x)^2}}{2 d e^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(a + b*Log[c*x^n]))/(d + e*x)^3,x]

[Out]

(b*n*Log[x] - (b*d*n*(d + e*x) + a*d*(d + 2*e*x) + b*d*(d + 2*e*x)*Log[c*x^n] + b*n*(d + e*x)^2*Log[d + e*x])/
(d + e*x)^2)/(2*d*e^2)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.14, size = 349, normalized size = 5.63

method result size
risch \(-\frac {b \left (2 e x +d \right ) \ln \left (x^{n}\right )}{2 \left (e x +d \right )^{2} e^{2}}-\frac {-i \pi b \,d^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+i \pi b \,d^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+2 i \pi b d e x \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 i \pi b d e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+2 i \pi b d e x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-2 i \pi b d e x \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-i \pi b \,d^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+2 \ln \left (e x +d \right ) b \,e^{2} n \,x^{2}-2 \ln \left (-x \right ) b \,e^{2} n \,x^{2}+4 \ln \left (e x +d \right ) b d e n x -4 \ln \left (-x \right ) b d e n x +4 \ln \left (c \right ) b d e x +2 \ln \left (e x +d \right ) b \,d^{2} n -2 \ln \left (-x \right ) b \,d^{2} n +2 b d e n x +2 d^{2} b \ln \left (c \right )+4 a d e x +2 b \,d^{2} n +2 a \,d^{2}}{4 d \,e^{2} \left (e x +d \right )^{2}}\) \(349\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*ln(c*x^n))/(e*x+d)^3,x,method=_RETURNVERBOSE)

[Out]

-1/2*b*(2*e*x+d)/(e*x+d)^2/e^2*ln(x^n)-1/4*(-I*Pi*b*d^2*csgn(I*c*x^n)^3+I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2
+I*Pi*b*d^2*csgn(I*c)*csgn(I*c*x^n)^2+2*I*Pi*b*d*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2-2*I*Pi*b*d*e*x*csgn(I*c)*csgn
(I*x^n)*csgn(I*c*x^n)+2*I*Pi*b*d*e*x*csgn(I*c)*csgn(I*c*x^n)^2-2*I*Pi*b*d*e*x*csgn(I*c*x^n)^3-I*Pi*b*d^2*csgn(
I*c)*csgn(I*x^n)*csgn(I*c*x^n)+2*ln(e*x+d)*b*e^2*n*x^2-2*ln(-x)*b*e^2*n*x^2+4*ln(e*x+d)*b*d*e*n*x-4*ln(-x)*b*d
*e*n*x+4*ln(c)*b*d*e*x+2*ln(e*x+d)*b*d^2*n-2*ln(-x)*b*d^2*n+2*b*d*e*n*x+2*d^2*b*ln(c)+4*a*d*e*x+2*b*d^2*n+2*a*
d^2)/d/e^2/(e*x+d)^2

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 107, normalized size = 1.73 \begin {gather*} -\frac {1}{2} \, b n {\left (\frac {e^{\left (-2\right )} \log \left (x e + d\right )}{d} - \frac {e^{\left (-2\right )} \log \left (x\right )}{d} + \frac {1}{x e^{3} + d e^{2}}\right )} - \frac {{\left (2 \, x e + d\right )} b \log \left (c x^{n}\right )}{2 \, {\left (x^{2} e^{4} + 2 \, d x e^{3} + d^{2} e^{2}\right )}} - \frac {{\left (2 \, x e + d\right )} a}{2 \, {\left (x^{2} e^{4} + 2 \, d x e^{3} + d^{2} e^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^3,x, algorithm="maxima")

[Out]

-1/2*b*n*(e^(-2)*log(x*e + d)/d - e^(-2)*log(x)/d + 1/(x*e^3 + d*e^2)) - 1/2*(2*x*e + d)*b*log(c*x^n)/(x^2*e^4
 + 2*d*x*e^3 + d^2*e^2) - 1/2*(2*x*e + d)*a/(x^2*e^4 + 2*d*x*e^3 + d^2*e^2)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 113, normalized size = 1.82 \begin {gather*} \frac {b n x^{2} e^{2} \log \left (x\right ) - b d^{2} n - a d^{2} - {\left (b d n + 2 \, a d\right )} x e - {\left (b n x^{2} e^{2} + 2 \, b d n x e + b d^{2} n\right )} \log \left (x e + d\right ) - {\left (2 \, b d x e + b d^{2}\right )} \log \left (c\right )}{2 \, {\left (d x^{2} e^{4} + 2 \, d^{2} x e^{3} + d^{3} e^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^3,x, algorithm="fricas")

[Out]

1/2*(b*n*x^2*e^2*log(x) - b*d^2*n - a*d^2 - (b*d*n + 2*a*d)*x*e - (b*n*x^2*e^2 + 2*b*d*n*x*e + b*d^2*n)*log(x*
e + d) - (2*b*d*x*e + b*d^2)*log(c))/(d*x^2*e^4 + 2*d^2*x*e^3 + d^3*e^2)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 398 vs. \(2 (53) = 106\).
time = 2.05, size = 398, normalized size = 6.42 \begin {gather*} \begin {cases} \tilde {\infty } \left (- \frac {a}{x} - \frac {b n}{x} - \frac {b \log {\left (c x^{n} \right )}}{x}\right ) & \text {for}\: d = 0 \wedge e = 0 \\\frac {\frac {a x^{2}}{2} - \frac {b n x^{2}}{4} + \frac {b x^{2} \log {\left (c x^{n} \right )}}{2}}{d^{3}} & \text {for}\: e = 0 \\\frac {- \frac {a}{x} - \frac {b n}{x} - \frac {b \log {\left (c x^{n} \right )}}{x}}{e^{3}} & \text {for}\: d = 0 \\- \frac {a d^{2}}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {2 a d e x}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {b d^{2} n \log {\left (\frac {d}{e} + x \right )}}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {b d^{2} n}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {2 b d e n x \log {\left (\frac {d}{e} + x \right )}}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {b d e n x}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} - \frac {b e^{2} n x^{2} \log {\left (\frac {d}{e} + x \right )}}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} + \frac {b e^{2} x^{2} \log {\left (c x^{n} \right )}}{2 d^{3} e^{2} + 4 d^{2} e^{3} x + 2 d e^{4} x^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*ln(c*x**n))/(e*x+d)**3,x)

[Out]

Piecewise((zoo*(-a/x - b*n/x - b*log(c*x**n)/x), Eq(d, 0) & Eq(e, 0)), ((a*x**2/2 - b*n*x**2/4 + b*x**2*log(c*
x**n)/2)/d**3, Eq(e, 0)), ((-a/x - b*n/x - b*log(c*x**n)/x)/e**3, Eq(d, 0)), (-a*d**2/(2*d**3*e**2 + 4*d**2*e*
*3*x + 2*d*e**4*x**2) - 2*a*d*e*x/(2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2) - b*d**2*n*log(d/e + x)/(2*d**
3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2) - b*d**2*n/(2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2) - 2*b*d*e*n*x
*log(d/e + x)/(2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2) - b*d*e*n*x/(2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**
4*x**2) - b*e**2*n*x**2*log(d/e + x)/(2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2) + b*e**2*x**2*log(c*x**n)/(
2*d**3*e**2 + 4*d**2*e**3*x + 2*d*e**4*x**2), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (57) = 114\).
time = 7.85, size = 122, normalized size = 1.97 \begin {gather*} -\frac {b n x^{2} e^{2} \log \left (x e + d\right ) + 2 \, b d n x e \log \left (x e + d\right ) - b n x^{2} e^{2} \log \left (x\right ) + b d n x e + b d^{2} n \log \left (x e + d\right ) + 2 \, b d x e \log \left (c\right ) + b d^{2} n + 2 \, a d x e + b d^{2} \log \left (c\right ) + a d^{2}}{2 \, {\left (d x^{2} e^{4} + 2 \, d^{2} x e^{3} + d^{3} e^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*x^n))/(e*x+d)^3,x, algorithm="giac")

[Out]

-1/2*(b*n*x^2*e^2*log(x*e + d) + 2*b*d*n*x*e*log(x*e + d) - b*n*x^2*e^2*log(x) + b*d*n*x*e + b*d^2*n*log(x*e +
 d) + 2*b*d*x*e*log(c) + b*d^2*n + 2*a*d*x*e + b*d^2*log(c) + a*d^2)/(d*x^2*e^4 + 2*d^2*x*e^3 + d^3*e^2)

________________________________________________________________________________________

Mupad [B]
time = 4.03, size = 108, normalized size = 1.74 \begin {gather*} -\frac {a\,d+x\,\left (2\,a\,e+b\,e\,n\right )+b\,d\,n}{2\,d^2\,e^2+4\,d\,e^3\,x+2\,e^4\,x^2}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d}{2\,e^2}+\frac {b\,x}{e}\right )}{d^2+2\,d\,e\,x+e^2\,x^2}-\frac {b\,n\,\mathrm {atanh}\left (\frac {2\,e\,x}{d}+1\right )}{d\,e^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(a + b*log(c*x^n)))/(d + e*x)^3,x)

[Out]

- (a*d + x*(2*a*e + b*e*n) + b*d*n)/(2*d^2*e^2 + 2*e^4*x^2 + 4*d*e^3*x) - (log(c*x^n)*((b*d)/(2*e^2) + (b*x)/e
))/(d^2 + e^2*x^2 + 2*d*e*x) - (b*n*atanh((2*e*x)/d + 1))/(d*e^2)

________________________________________________________________________________________